﻿@using Core.Contract.DataContract
@using www.Controllers
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script>
    $(document).ready(function() {
        
        if ($(window).width() <= 640) {
            $('#comment').css({ width: 320 });
            
        }
        $('.fb-comments').attr('data-width', $('#comment').width());
    });
   
</script>
<div class="content">
    <div class="default-left">
        <div class="content">
            @if (Model != null)
            {
                <div class="row">
                    <h3><b>@Model.Name</b></h3>
                </div>
                <div class="row">
                    <div class="detailnew-left"><i>@Utility.GetResource.GetResouceValue(Session["Culture"], "lblPostby"): @Model.UserName</i></div>
                    <div class="detailnew-right">
                        <i>@Utility.GetResource.GetResouceValue(Session["Culture"], "lblDatePost"): @Model.Date.ToShortDateString()</i>
                    </div>
                </div>
                <div class="row">
                  
                    <a href="https://twitter.com/share?count=data-count" class="twitter-share-button" data-url="http://relax2s.com/Home/StoryDetail/@Session["Culture"]/@Model.CategoryId/@Model.Id/@Model.Tag" data-text="Dragon infomation" data-via="Dragon_hy"></a>
                    <script type="IN/FollowCompany" data-id="http://relax2s.com" data-counter="right"></script>
                    <script type="IN/Share" data-url="http://relax2s.com" data-counter="right"></script>
                    <div class="g-plusone" data-annotation="inline" data-width="60"></div>
                      <div class="fb-like" data-href="http://relax2s.com/Home/StoryDetail/@Session["Culture"]/@Model.CategoryId/@Model.Id/@Model.Tag" data-width="200" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div>
                </div>
                <div class="frame-content">
                    <div style="text-align: justify; width: 98%; margin: 10px auto; position: relative;">
                        @Html.Raw(HttpUtility.HtmlDecode(Model.Detail))
                    </div>
                </div>
                <div class="clear"></div>
                <div class="row">
                    
                    <a href="https://twitter.com/share?count=data-count" class="twitter-share-button" data-url="http://relax2s.com/Home/StoryDetail/@Session["Culture"]/@Model.CategoryId/@Model.Id/@Model.Tag" data-text="Dragon infomation" data-via="Dragon_hy"></a>
                    <script type="IN/FollowCompany" data-id="http://relax2s.com" data-counter="right"></script>
                    <script type="IN/Share" data-url="http://relax2s.com" data-counter="right"></script>
                    <div class="g-plusone" data-annotation="inline" data-width="60"></div>
                    <div class="fb-like" data-href="http://relax2s.com/Home/StoryDetail/@Session["Culture"]/@Model.CategoryId/@Model.Id/@Model.Tag" data-width="200" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div>
                </div>
                <div class="clear"></div>
                <div class="coment-fb" id="comment">
                    <div class="fb-comments" data-href="http://relax2s.com/Home/PhotoDetail/@Session["Culture"]/@Model.Id/@Model.Tag" data-numposts="10" data-colorscheme="light"></div>
                </div>
            }
            else
            {
                <span>@Utility.GetResource.GetResouceMessage(Session["Culture"], "lblEmpty")</span>
            }
        </div>
    </div>
    <div class="default-right">
        <div id="readstory">
            @if (ViewBag.AngleSaidCategory != null)
            {
                foreach (var item in (List<RelaxStoryDataContract>)ViewBag.AngleSaidCategory)
                {
                <div class="readfun">
                    <div class="imgredstory">
                        <a href="/Home/AngleSaidDetail/@Session["Culture"]/@item.CategoryId/@item.Id/@item.Tag">
                            <img src="/@item.Image" alt="@item.Name"/>
                        </a>
                    </div>
                    <div class="deinfo">
                        <div class="row name">
                            <h3><b><a href="/Home/AngleSaidDetail/@Session["Culture"]/@item.CategoryId/@item.Id/@item.Tag">@item.Name</a></b></h3>
                        </div>
                        <div class="content detail-content">
                            @if (item.Decription != null && HttpUtility.HtmlDecode(item.Decription).Length > 80)
                            {
                                <h4>@Html.Raw(HttpUtility.HtmlDecode(item.Decription).Substring(0, 80)) ... </h4> 
                                <a href="/Home/AngleSaidDetail/@Session["Culture"]/@item.CategoryId/@item.Id/@item.Tag">@Utility.GetResource.GetResouceValue(Session["Culture"], "lblWatchDetail")...</a>
                            }
                            else
                            {
                                <h4>@Html.Raw(HttpUtility.HtmlDecode(item.Decription))</h4> 
                                <a href="/Home/AngleSaidDetail/@Session["Culture"]/@item.CategoryId/@item.Id/@item.Tag">@Utility.GetResource.GetResouceValue(Session["Culture"], "lblWatchDetail")...</a>
                            }
                        </div>
                    </div>
                </div>
                }
                <div class="watchmore">
                    <a href="/Home/AngleSaid/@Session["Culture"]">@Utility.GetResource.GetResouceValue(Session["Culture"], "lblWatchMore")...</a>
                </div>
            }
        </div>

    </div>
</div>
